<template lang="pug">
  .map-frame.page(v-if='data' style='z-index: 4999;')
    iframe.frame-wrap(width="100%", height="100%", frameBorder="0", scrolling="no", :src="data")
    CtrlBar(pos='top', @closeBar='data = null')
</template>

<script>
import CtrlBar from '@/components/CtrlBar'
export default {
  data() {
    return {
      data: null
    }
  },
  mounted() {
    this.$vgo.on('iframe:map', addr => {
      this.data = addr
      this.$bar.finish()
    })
  },
  components: {
    CtrlBar
  }
}
</script>

<style lang="stylus" scoped>
.map-frame
  padding 5%
</style>
